import request from "@/utils/request";

//账号管理列表
export function getAccountList(params) {
  return request({
    url: "/account",
    method: "get",
    params,
  });
}
//修改第三方账号
export function editAccount(data) {
  return request({
    url: `/account/${data.id}`,
    method: "put",
    data,
  });
}
//删除第三方账号
export function delAccount(data) {
  return request({
    url: `/account/${data.id}`,
    method: "DELETE",
  });
}

//新增第三方账号
export function addAccount(data) {
  return request({
    url: `/account`,
    method: "POST",
    data,
  });
}

//切换账号状态
export function stateAccount(data) {
  return request({
    url: `/account/batch/switch/state`,
    method: "PATCH",
    data,
  });
}
//payoneer授权生成链接
export function payoneerLink(params) {
  return request({
    url: `/payoneer/authorize/link`,
    method: "get",
    params,
  });
}
//payoneer授权回调
export function payoneerCallback(params) {
  return request({
    url: `/payoneer/authorize/callback`,
    method: "get",
    params,
  });
}
//连连授权生成链接
export function lianlianLink(params) {
  return request({
    url: `/lianlian/authorize/link`,
    method: "get",
    params,
  });
}
//连连授权回调
export function lianlianCallback(params) {
  return request({
    url: `/lianlian/authorize/callback`,
    method: "get",
    params,
  });
}
